package grape.workflow.rest.flowable.ext;

import grape.common.exception.runtime.RBaseException;
import org.flowable.idm.api.*;
import org.flowable.idm.engine.IdmEngineConfiguration;
import org.flowable.idm.engine.impl.UserQueryImpl;
import org.flowable.idm.engine.impl.persistence.entity.UserEntity;
import org.flowable.idm.engine.impl.persistence.entity.UserEntityManagerImpl;
import org.flowable.idm.engine.impl.persistence.entity.data.UserDataManager;

import java.util.List;
import java.util.Map;

/**
 * Created by yw on 2017/2/4.
 */

public class CustomUserEntityManager extends UserEntityManagerImpl {

    public CustomUserEntityManager() {
        this(null, null);
    }
    public CustomUserEntityManager(IdmEngineConfiguration idmEngineConfiguration, UserDataManager userDataManager) {
        super(idmEngineConfiguration, userDataManager);
    }

    @Override
    public User createNewUser(String userId) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void updateUser(User updatedUser) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public List<User> findUserByQueryCriteria(UserQueryImpl query) {
        return null;
    }

    @Override
    public long findUserCountByQueryCriteria(UserQueryImpl query) {
        return 0;
    }

    @Override
    public UserQuery createNewUserQuery() {
        return new CustomUserQueryImpl();
    }

    @Override
    public Boolean checkPassword(String userId, String password, PasswordEncoder passwordEncoder, PasswordSalt passwordSalt) {
        return null;
    }

    @Override
    public List<User> findUsersByNativeQuery(Map<String, Object> parameterMap) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public long findUserCountByNativeQuery(Map<String, Object> parameterMap) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public boolean isNewUser(User user) {
        return false;
    }

    @Override
    public Picture getUserPicture(User user) {
        return null;
    }

    @Override
    public void setUserPicture(User user, Picture picture) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void deletePicture(User user) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public List<User> findUsersByPrivilegeId(String privilegeId) {
        return null;
    }

    @Override
    public UserEntity create() {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public UserEntity findById(String entityId) {
        return null;
    }

    @Override
    public void insert(UserEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void insert(UserEntity entity, boolean fireCreateEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public UserEntity update(UserEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public UserEntity update(UserEntity entity, boolean fireUpdateEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(String id) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(UserEntity entity) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }

    @Override
    public void delete(UserEntity entity, boolean fireDeleteEvent) {
        throw new RBaseException("not implement method.you can extends this class and then inject into spring");
    }
}
